package com.xukehong.demo.service.payment;

import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author: xkh
 * @Date: 2019/12/7 14:12
 * @Version 1.0
 */
@Service("pass1Pay")
public class Pass1PaymentService extends AbstractPaymentService {

    @Override
    public JSONObject payOrder(JSONObject params, HttpServletRequest request) {
        //请求接口后的结果
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("upCode", "ABC123456789");
        jsonObject.put("qrcode", "http://www.baidu.com");
        return jsonObject;
    }

    @Override
    public JSONObject queryPay(JSONObject params) {
        //请求接口后的结果
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("upCode", "ABC123456789");
        jsonObject.put("status", "1"); //支付成功
        return jsonObject;
    }
}
